package leetcode.每日一题;

import org.junit.Test;

import java.util.*;

/**
 * @author ：zsy
 * @date ：Created 2021/6/24 20:47
 * @description：
 */
public class 牛牛 extends Thread {
    @Override
    public void run() {
        super.run();
    }

    @Test
    public void test() {
        Solution solution = new Solution();
        System.out.println(solution.NNAplusB(1, 1));
    }

    public class Solution {
        /**
         * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
         *
         *
         * @param a int整型
         * @param b int整型
         * @return long长整型
         */
        public long NNAplusB (int a, int b) {
            // write code here
            int aa = a;
            int bb = b;
            long newA = (long)a;
            long newB = (long)b;
            while(bb > 1) {
                newA = newA * 10 + a;
                bb--;
            }
            System.out.println(newA);
            while(aa > 1) {
                newB = newB * 10 + b;
                aa--;
            }
            System.out.println(newB);
            return newA + newB;
        }
    }

}


